package com.example.Mybatis.Service;

import com.example.Annotation.ChooseDataSource;
import com.example.Bean.SensorData;
import com.example.Enum.DataSourceEnum;
import com.example.Mybatis.MapperDao.SensorDataMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
public class SensorMapperService {


    @Resource
    SensorDataMapper sensorDataDao;

    @ChooseDataSource(dataSourceName = DataSourceEnum.DATA_SOURCE_EQUIPMENT)
    public List <SensorData> getSensorData() {

        return sensorDataDao.getSensorData();
    }

}
